import { request } from '@/utils/request';

// 查询公告列表
export function listNotice(query: any) {
  return request.get({
    url: '/system/notice/list',
    params: query,
  });
}

// 查询公告详细
export function getNotice(noticeId: string | number) {
  return request.get({
    url: '/system/notice/' + noticeId,
  });
}

// 新增公告
export function addNotice(data: any) {
  return request.post({
    url: '/system/notice',
    data: data,
  });
}

// 修改公告
export function updateNotice(data: any) {
  return request.put({
    url: '/system/notice',
    data: data,
  });
}

// 删除公告
export function delNotice(noticeId: string | number) {
  return request.delete({
    url: '/system/notice/' + noticeId,
  });
}
